home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / tclib20.zip / DEMO.ZIP / DEMOPOP.C < prev    next >
Text File  |  1988-12-03  |  992b  |  33 lines

  1. /* demopop.c  - used for testing TCHK popup menus */
  2.  
  3. #include <menuhk.h>
  4. #include <video.h>
  5. #include <color.h>
  6. #include <howard.h>
  7. #include <stdio.h>
  8. #include <string.h>
  9.  
  10. void main()
  11. {
  12.     extern int _argc, popuperrno;
  13.     char *cmd[]={""," Protocol",""," Xmodem"," Ymodem"," Zmodem"," Disabled"," Other",""};
  14.     char cmdflag[] = { 2,2,2,0,0,0,1,0,2 };
  15.     char fr[] = {'╔','═','╗','║','╝','═','╚','║','\0','╣','╠'};
  16.     int k, cmdkey[] = { -1,-1,-1, 1,1,1, -1, -1, -1};
  17.     struct popup_header *ph;
  18.  
  19.     ph = popup_alloc(8,4,25,14,fr,"Upload",_argc-1,cmd,cmdkey,cmdflag,
  20.                    LWHITE|B_BLUE, LRED, YELLOW, LRED, LBLUE|B_WHITE, CYAN,
  21.                    BLACK|B_CYAN, LGREEN, 1, CASEINDEP|ERASEMENU|WRAPAROUND|ESCQUIT);
  22.     if (ph == NULL)
  23.         printf("ph == NULL\n");
  24.     else {
  25.         do {
  26.             k = popup_get(ph);
  27.             gotohv(60,22);
  28.             printf("k = %2d",k);
  29.         } while (k != 0);
  30.         popup_free(ph);
  31.     }
  32. }
  33.